package com.dragon.common.modules.uaa.web.models.params;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Chris Chan
 * Create On 2025/8/8 下午12:01
 * Use for:
 * Explain:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "邮箱参数")
public class EmailParam implements Serializable {
    private static final long serialVersionUID = 1L;
    @jakarta.validation.constraints.Email(message = "邮箱格式错误")
    @NotBlank(message = "邮箱不能为空")
    @Schema(description = "邮箱", example = "def@163.com")
    private String email;

    public static EmailParam of(String email) {
        return new EmailParam(email);
    }

    public static EmailParam create(String email) {
        return new EmailParam(email);
    }
}
